package TakeAwaySystem;

import java.util.Scanner;

/**
 * @author Vv
 * @version 1.0
 * @project coding_learn
 * @description
 * @date 2023/9/25 17:57:35
 */
public class Main {
    public static void main(String[] args) {
        System.out.println("* * * * * * * * * * * * * * * * * * * * * * * * * * * * *");// \n
        System.out.println("*               欢迎使用控制台版饿了么系统                  	*");
        System.out.println("* * * * * * * * * * * * * * * * * * * * * * * * * * * * *");// \n
        System.out.println("请选择输入你的身份 ： ");
        System.out.println("我是商户 / 我想成为商户 请选择 1");
        System.out.println("我是管理员 / 我想成为管理员 请选择 2");
        Scanner scanner = new Scanner(System.in);
        int choice = scanner.nextInt();
        User user = null;

        switch(choice){
            case 1:
            user = new Business();
                user = user.userLoginOrRegistered(Business.file);
                break;
            case 2:
                user = new Admin();
                user = user.userLoginOrRegistered(Admin.file);
                break;
        }
        do{
            int input = user.menu();
            if(input == 0){
                System.out.println("退出成功");
                return ;
            }
            user.Operation(input);
        }while(true);

    }


}
